//
//  webView.m
//  cityStar
//
//  Created by joyban on 15-1-13.
//  Copyright (c) 2015年 tiny. All rights reserved.
//

#import "webView.h"

@interface webView ()<UIWebViewDelegate>
@property (weak, nonatomic) IBOutlet UIWebView *shopWebView;

@end

@implementation webView

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = self.navTitle;
    [self addBackButton];
    NSString *path = @"";
    if([self.type isEqualToString:@"goods"])
    {
        path = @"http://api.icszx.com/resource/goods/";
    }else{
        path = @"http://api.icszx.com/resource/supplier/";
    }
    if(self.goodsid == nil)
    {
        self.goodsid = @"";
    }
    
    NSString *gatpath = [path stringByAppendingString:[NSString stringWithFormat:@"%@",self.goodsid]];
    NSURL *url = [NSURL URLWithString:gatpath];
    [self.shopWebView loadRequest:[NSURLRequest requestWithURL:url]];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

//开始加载数据
- (void)webViewDidStartLoad:(UIWebView *)webView {

}

//数据加载完
- (void)webViewDidFinishLoad:(UIWebView *)webView {

}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
